package com.example.springmvcinterview.circularDependency;

import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author : 叶荻风
 * @create : 2024/12/23 17:01
 */
@Component
public class A {
    private  B b;
    @Autowired
    public void setB(B b) {
        System.out.println("Class A里填充class B");
        this.b = b;
    }

//    public A(B b) {
//        this.b = b;
//    }

    public  void doSomething(){
        System.out.println("do something");
    }
}